import 'package:flutter_base/common/entitys/entitys.dart';
import 'package:flutter_base/common/utils/utils.dart';
import 'package:flutter/material.dart';

/// 用户
class UserAPI {

  /// 登录
  static Future<UserResponseEntity> login({
     params,
    required BuildContext context,
  }) async {
    var response = await HttpUtil()
        .post('/zjl/api/base/login', params: params, context: context);
    return UserResponseEntity.fromJson(response);
  }

  /// 获取手机验证码
  static Future<BaseResponseEntity> getMobileCaptcha({
     params,
    required BuildContext context,
  }) async {
    var response = await HttpUtil().get(
        '/zjl/api/base/captcha/getMobileCaptcha',
        params: params,
        context: context);
    return BaseResponseEntity.fromJson(response);
  }
}
